package com.endava.nio_io;

import java.io.File;
import java.io.IOException;

/**
 * @author adumitrescu
 *
 */
public class MyIOFile {
	/**In main creating a file myfile.txt and prints
	 * the absoulte path
	 * the file length
	 * if it is marked as hidden
	 * and deletes the file at the end
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {

		File f = new File("myfile.txt");
		if (f.exists() == false) {
			f.createNewFile();
		} else {
			System.out.println(f);
		}
		System.out.println("path=" + f.getAbsolutePath());
		System.out.println("file length=" + f.length());
		System.out.println("file hidden=" + f.isHidden());
		f.delete();
	}
}
